<template>
  <!-- <router-view v-slot="{ Component }">
    <keep-alive>
      <component :is="Component" />
    </keep-alive>
  </router-view> -->
  <router-view v-slot="{ Component }">
    <keep-alive>
      <component :is="Component"  v-if="route.meta.keepAlive"/>
    </keep-alive>
    <component :is="Component"  v-if="!route.meta.keepAlive"/>
  </router-view> 
</template>

<script setup>
import { onMounted } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
onMounted(() => {
  console.log('route', route);
})

</script>

<style scoped></style>
